var data = {
    news:"",
    goods:"",
}

const reducer = (state=data,action={}) => {
    const {type,payload} = action;
    switch(type){
        case "GETNEWSHOME":
            return Object.assign({},state,{news:payload.data,cateChild:payload.ids});
        case "GETGOODSHOME":
            return Object.assign({},state,{goods:payload.data,cateChild:payload.ids});
        default:
            return state;
    }
};

module.exports = reducer;